#include "stdio.h"
#include "string.h"

main()
{
    long int a,b,t,q,temp,out;
    
    while (scanf("%ld",&a)!=EOF)
    {
        b=1;
        out=a;
        while ((a-b)>0) 
        {
            a-=b;
            b++;
        }    
        t=a;
        q=b-t+1;
        if (b%2==1)
        {
            temp=t;
            t=q;
            q=temp;
        }    
        printf("TERM %ld IS %ld/%ld\n",out,t,q);

        
    }    
    
    
}    